//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima;

import java.io.PrintStream;
import java.util.Objects;

public class TestLambda {
    public TestLambda() {
    }

    public static void main(String[] args) {
        testB();
    }

    public static void testD() {
        D var10000 = new D() {
            public int max(int a, int b) {
                return Math.max(a, b);
            }
        };
        D d2 = (a, b) -> {
            return a > b ? a : b;
        };
        D d3 = Math::max;
        int max = d3.max(1, 2);
        System.out.println(max);
    }

    public static void testC() {
        C var10000 = new C() {
            public String show(String name) {
                return "name = " + name;
            }
        };
        C c2 = (name) -> {
            return "name = " + name;
        };
        C c3 = TestLambda::show4;
    }

    public static String show4(String name) {
        return "name = " + name;
    }

    private static void testB() {
        B var10000 = new B() {
            public void show(String name) {
                System.out.println(name);
            }
        };
        B b2 = (name) -> {
            System.out.println(name);
        };
        b2.show("四李同学");
        PrintStream var3 = System.out;
        Objects.requireNonNull(var3);
        B b3 = var3::println;
        b3.show("三张同学");
    }

    public static void testA() {
        A var10000 = new A() {
            public void show(String name, int age) {
                System.out.println(name + "," + age);
            }
        };
        A a2 = (name, age) -> {
            System.out.println(name + "," + age);
        };
        a2.show("张三", 18);
        A a3 = TestLambda::show2;
        a3.show("李四", 20);
        A a4 = TestLambda::show3;
        a3.show("王五", 35);
    }

    public static void show2(String name, int age) {
        System.out.println("show2:" + name + "," + age);
    }

    public static void show3(String name, int age) {
        System.out.println("show3:" + name + "," + age);
    }
}
